/*
 * Copyright (C) 2012-2013 c-netrunner (http://code.google.com/p/c-netrunner)
 * 
 * This program is free software: you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License as published 
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *   
 * This source code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.ridgelineapps.netrunner.api;

public class Card {
   public String name;
	public Side side;
	public enum Side {
	   Corp,
	   Runner
	}	
	public Type type;
	public enum Type {
		CorpIdentity,
		Asset,
		Ice,
		Agenda,
		Operation,
		Upgrade,
		
		RunnerIdentity,
		Program,
		Hardware,
		Resource,
		Event,
	}
	public Subtype subtype;
	public enum Subtype {
	   None,
	   Advertisement,
	   Initiative,
	   Gmod,
	   Virus,
	   Security,
	   IcebreakerKiller,
	}
	public Faction faction;
	public enum Faction {
      CorpNeutral,
	   HaasBioroid,
	   Jinteki,
	   NBN,
	   Weyland,

	   RunnerNeutral,
	   Anarch,
      Criminal,
	   Shaper,
	}

   public int factionCost;
	public int quantity;
	
	public int cost;
	public int rezCost;
	public int trashCost;
	public boolean rezzed;
	public int strength;
	public int agendaPoints;
	public int memoryCost;
	public boolean unique;
	
	public int providesMemory;
	public int providesLink;

	public void turnEvent(GameContext context, TurnEvent event) {
	   switch(event) {
	      case begin:
	         if(id == Id.PADCampaign) {
	            context.playArea.corpCredits++;
	         }
	         break;
	      case end:
	         break;
	   }
	}
	
	public void event(GameContext context) {
	   if(id == Id.SureGamble) {
	      context.playArea.runnerCredits += 9;
	   }
	}
	
   public void operation() {
      
   }
   
   public Id id;
   public enum Id {
      PADCampaign,
      
      SureGamble,
      AdonisCampaign,
   }
   
   public static Card[] cards = new Card[]{
   };
   
   static {
      cards = new Card[2];
      Card card;
      
      card = new Card();
      cards[0] = card;
      card.name = "PAD Campaign";
      card.id = Card.Id.PADCampaign;
      card.type = Card.Type.Asset;
      card.subtype = Card.Subtype.Advertisement;
      card.side = Card.Side.Corp;
      card.faction = Card.Faction.CorpNeutral;
      card.cost = 2;
      card.factionCost = 0;
      card.trashCost = 4;
      card.quantity = 3;

      card = new Card();
      cards[0] = card;
      card.name = "Sure Gamble";
      card.id = Card.Id.SureGamble;
      card.type = Card.Type.Event;
      card.subtype = Card.Subtype.None;
      card.side = Card.Side.Runner;
      card.faction = Card.Faction.RunnerNeutral;
      card.cost = 5;
      card.factionCost = 0;
      card.quantity = 3;
   }   
}
